package com.easymin.weixin.entity.simpleCarPool;

import org.apache.commons.lang3.StringUtils;
import java.io.Serializable;
import java.util.Date;

/**
 * 工作车接送记录.
 * @author Administrator
 */

public class WorkCarPickup implements Serializable {

  private static final long serialVersionUID = 1L;

  /**
   * 未接.
   */
  public static final int WORKCAR_WEIJIE = 0;
  /**
   * 我去接.
   */
  public static final int WORKCAR_YIJIE = 1;
  /**
   * 已接到.
   */
  public static final int WORKCAR_SHANGCHE = 2;
  /**
   * 完成.
   */
  public static final int WORKCAR_WANCHENG = 3;
  /**
   * 取消.
   */
  public static final int WORKCAR_CANCEL = 4;

  private String place;// 接送地点

  private Double longitude; // 接送经度

  private Double latitude; // 接送纬度

  private Date arriveTime;// 到达时间

  private Long driverId;// 被接送司机id

  private String driverAccount;// 被接送司机工号

  private String driverName;// 被接送司机name

  private String driverPhone;// 被接送司机电话

  private String driverPhoto;// 被接送司机头像

  private Long companyId;// 司机的公司id

  private String companyName;// 司机的公司简称

  private Long orderCompanyId;// 订单的公司id

  private String orderCompanyName;// 订单的公司简称

  private Long pikerId;// 接送司机id

  private String pikerName;// 接送司机name

  private Long orderId;// 订单id

  private String orderNumber;// 订单号;

  private Integer status;// 接送记录状态

  private String statusstr;// 预计到达时间

  private boolean orderComplete;// 订单是否完成

  private Long workCarAreaId;// 路线id

  private WorkCarArea workCarArea;// 线路

  private String toPlaceDistance;// 司机到目的地距离

  private Long toPlaceTime;// 司机到目的地时间（分钟）

  private String appKey;

  private Long version;

  private Long id;
  private Date created;
  private Date updated;


  public WorkCarArea getWorkCarArea() {
    return workCarArea;
  }

  public void setWorkCarArea(WorkCarArea workCarArea) {
    this.workCarArea = workCarArea;
  }

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public Date getCreated() {
    return created;
  }

  public void setCreated(Date created) {
    this.created = created;
  }

  public Date getUpdated() {
    return updated;
  }

  public void setUpdated(Date updated) {
    this.updated = updated;
  }

  public Long getVersion() {
    return version;
  }

  public void setVersion(Long version) {
    this.version = version;
  }

  public String getAppKey() {
    return appKey;
  }

  public void setAppKey(String appkey) {
    appKey = appkey;
  }

  public Long getWorkCarAreaId() {
    return workCarAreaId;
  }

  public void setWorkCarAreaId(Long workCarAreaId) {
    this.workCarAreaId = workCarAreaId;
  }

  public String getPlace() {
    if (null == place) {
      return "";
    }
    return place;
  }

  public void setPlace(String place) {
    this.place = place;
  }

  public Double getLongitude() {
    return longitude;
  }

  public void setLongitude(Double longitude) {
    this.longitude = longitude;
  }

  public Double getLatitude() {
    return latitude;
  }

  public void setLatitude(Double latitude) {
    this.latitude = latitude;
  }

  public Date getArriveTime() {
    return arriveTime;
  }

  public void setArriveTime(Date arriveTime) {
    this.arriveTime = arriveTime;
  }

  public Long getDriverId() {
    return driverId;
  }

  public void setDriverId(Long driverId) {
    this.driverId = driverId;
  }

  public String getDriverName() {
    return driverName;
  }

  public void setDriverName(String driverName) {
    this.driverName = driverName;
  }

  public Long getOrderId() {
    return orderId;
  }

  public void setOrderId(Long orderId) {
    this.orderId = orderId;
  }

  public String getOrderNumber() {
    return orderNumber;
  }

  public void setOrderNumber(String orderNumber) {
    this.orderNumber = orderNumber;
  }

  public Long getPikerId() {
    return pikerId;
  }

  public void setPikerId(Long pikerId) {
    this.pikerId = pikerId;
  }

  public String getPikerName() {
    return pikerName;
  }

  public void setPikerName(String pikerName) {
    this.pikerName = pikerName;
  }

  public Long getCompanyId() {
    return companyId;
  }

  public void setCompanyId(Long companyId) {
    this.companyId = companyId;
  }

  public String getDriverPhone() {
    return driverPhone;
  }

  public void setDriverPhone(String driverPhone) {
    this.driverPhone = driverPhone;
  }

  public String getDriverAccount() {
    return driverAccount;
  }

  public void setDriverAccount(String driverAccount) {
    this.driverAccount = driverAccount;
  }

  public String getCompanyName() {
    return companyName;
  }

  public void setCompanyName(String companyName) {
    this.companyName = companyName;
  }

  public String getDriverPhoto() {
    return driverPhoto;
  }

  public void setDriverPhoto(String driverPhoto) {
    this.driverPhoto = driverPhoto;
  }

  public Integer getStatus() {
    if (null == status) {
      return 0;
    }
    return status;
  }

  public void setStatus(Integer status) {
    this.status = status;
  }

  public String getStatusstr() {
    if (status == 2) {
      return "已接到";
    }
    if (status == 3) {
      return "已完成";
    }
    if (status == 4) {
      return "已取消";
    }
    if (StringUtils.isBlank(statusstr)) {
      return "无法预计";
    }
    return statusstr;
  }

  public void setStatusstr(String statusstr) {
    this.statusstr = statusstr;
  }

  public boolean isOrderComplete() {
    return orderComplete;
  }

  public void setOrderComplete(boolean orderComplete) {
    this.orderComplete = orderComplete;
  }

  public Long getOrderCompanyId() {
    return orderCompanyId;
  }

  public void setOrderCompanyId(Long orderCompanyId) {
    this.orderCompanyId = orderCompanyId;
  }

  public String getOrderCompanyName() {
    return orderCompanyName;
  }

  public void setOrderCompanyName(String orderCompanyName) {
    this.orderCompanyName = orderCompanyName;
  }

  /**
   * ....
   */
  public String getToPlaceDistance() {
    if (StringUtils.isBlank(toPlaceDistance)) {
      return "0.0";
    }
    return toPlaceDistance;
  }

  public void setToPlaceDistance(String toPlaceDistance) {
    this.toPlaceDistance = toPlaceDistance;
  }

  /**
   * ...
   */
  public Long getToPlaceTime() {
    if (null == toPlaceTime) {
      return 0L;
    }
    return toPlaceTime;
  }

  public void setToPlaceTime(Long toPlaceTime) {
    this.toPlaceTime = toPlaceTime;
  }

  @Override
  public String toString() {
    return "WorkCarPickup [place=" + place + ", longitude=" + longitude + ", latitude=" + latitude
        + ", arriveTime=" + arriveTime + ", driverId=" + driverId + ", driverAccount="
        + driverAccount + ", driverName=" + driverName + ", driverPhone=" + driverPhone
        + ", driverPhoto=" + driverPhoto + ", companyId=" + companyId + ", companyName="
        + companyName + ", orderCompanyId=" + orderCompanyId + ", orderCompanyName="
        + orderCompanyName + ", pikerId=" + pikerId + ", pikerName=" + pikerName + ", orderId="
        + orderId + ", orderNumber=" + orderNumber + ", status=" + status + ", statusstr="
        + statusstr + ", orderComplete=" + orderComplete + ", workCarAreaId=" + workCarAreaId
        + ", workCarArea=" + workCarArea + ", toPlaceDistance=" + toPlaceDistance
        + ", toPlaceTime=" + toPlaceTime + ", appKey=" + appKey + ", version=" + version + ", id="
        + id + ", created=" + created + ", updated=" + updated + "]";
  }

}
